.class public Lcom/google/android/exoplayer/n;
.super Lcom/google/android/exoplayer/MediaCodecTrackRenderer;
.source "MediaCodecVideoTrackRenderer.java"


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x10
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/google/android/exoplayer/n$d;
    }
.end annotation


# instance fields
.field private final P:Lcom/google/android/exoplayer/v;

.field private final Q:Lcom/google/android/exoplayer/n$d;

.field private final R:J

.field private final S:I

.field private final T:I

.field private U:Landroid/view/Surface;

.field private V:Z

.field private W:Z

.field private X:J

.field private Y:J

.field private Z:I

.field private i0:I

.field private j0:I

.field private k0:F

.field private l0:I

.field private m0:I

.field private n0:I

.field private o0:F

.field private p0:I

.field private q0:I

.field private r0:I

.field private s0:F


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/google/android/exoplayer/r;Lcom/google/android/exoplayer/m;IJLandroid/os/Handler;Lcom/google/android/exoplayer/n$d;I)V
    .locals 12

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v3, p3

    move/from16 v4, p4

    move-wide/from16 v5, p5

    move-object/from16 v9, p7

    move-object/from16 v10, p8

    move/from16 v11, p9

    .line 1
    invoke-direct/range {v0 .. v11}, Lcom/google/android/exoplayer/n;-><init>(Landroid/content/Context;Lcom/google/android/exoplayer/r;Lcom/google/android/exoplayer/m;IJLcom/google/android/exoplayer/drm/b;ZLandroid/os/Handler;Lcom/google/android/exoplayer/n$d;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/google/android/exoplayer/r;Lcom/google/android/exoplayer/m;IJLcom/google/android/exoplayer/drm/b;ZLandroid/os/Handler;Lcom/google/android/exoplayer/n$d;I)V
    .locals 8

    move-object v7, p0

    move-object v0, p0

    move-object v1, p2

    move-object v2, p3

    move-object v3, p7

    move/from16 v4, p8

    move-object/from16 v5, p9

    move-object/from16 v6, p10

    .line 2
    invoke-direct/range {v0 .. v6}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;-><init>(Lcom/google/android/exoplayer/r;Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/drm/b;ZLandroid/os/Handler;Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;)V

    .line 3
    new-instance v0, Lcom/google/android/exoplayer/v;

    move-object v1, p1

    invoke-direct {v0, p1}, Lcom/google/android/exoplayer/v;-><init>(Landroid/content/Context;)V

    iput-object v0, v7, Lcom/google/android/exoplayer/n;->P:Lcom/google/android/exoplayer/v;

    move v0, p4

    .line 4
    iput v0, v7, Lcom/google/android/exoplayer/n;->S:I

    const-wide/16 v0, 0x3e8

    mul-long v0, v0, p5

    .line 5
    iput-wide v0, v7, Lcom/google/android/exoplayer/n;->R:J

    move-object/from16 v0, p10

    .line 6
    iput-object v0, v7, Lcom/google/android/exoplayer/n;->Q:Lcom/google/android/exoplayer/n$d;

    move/from16 v0, p11

    .line 7
    iput v0, v7, Lcom/google/android/exoplayer/n;->T:I

    const-wide/16 v0, -0x1

    .line 8
    iput-wide v0, v7, Lcom/google/android/exoplayer/n;->X:J

    const/4 v0, -0x1

    .line 9
    iput v0, v7, Lcom/google/android/exoplayer/n;->l0:I

    .line 10
    iput v0, v7, Lcom/google/android/exoplayer/n;->m0:I

    const/high16 v1, -0x40800000    # -1.0f

    .line 11
    iput v1, v7, Lcom/google/android/exoplayer/n;->o0:F

    .line 12
    iput v1, v7, Lcom/google/android/exoplayer/n;->k0:F

    .line 13
    iput v0, v7, Lcom/google/android/exoplayer/n;->p0:I

    .line 14
    iput v0, v7, Lcom/google/android/exoplayer/n;->q0:I

    .line 15
    iput v1, v7, Lcom/google/android/exoplayer/n;->s0:F

    return-void
.end method

.method private A()V
    .locals 12

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/google/android/exoplayer/n;->Q:Lcom/google/android/exoplayer/n$d;

    if-eqz v0, :cond_1

    iget v0, p0, Lcom/google/android/exoplayer/n;->p0:I

    iget v1, p0, Lcom/google/android/exoplayer/n;->l0:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/google/android/exoplayer/n;->q0:I

    iget v1, p0, Lcom/google/android/exoplayer/n;->m0:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/google/android/exoplayer/n;->r0:I

    iget v1, p0, Lcom/google/android/exoplayer/n;->n0:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/google/android/exoplayer/n;->s0:F

    iget v1, p0, Lcom/google/android/exoplayer/n;->o0:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    iget v0, p0, Lcom/google/android/exoplayer/n;->l0:I

    .line 3
    iget v7, p0, Lcom/google/android/exoplayer/n;->m0:I

    .line 4
    iget v8, p0, Lcom/google/android/exoplayer/n;->n0:I

    .line 5
    iget v9, p0, Lcom/google/android/exoplayer/n;->o0:F

    .line 6
    iget-object v10, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    new-instance v11, Lcom/google/android/exoplayer/n$a;

    move-object v1, v11

    move-object v2, p0

    move v3, v0

    move v4, v7

    move v5, v8

    move v6, v9

    invoke-direct/range {v1 .. v6}, Lcom/google/android/exoplayer/n$a;-><init>(Lcom/google/android/exoplayer/n;IIIF)V

    invoke-virtual {v10, v11}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 7
    iput v0, p0, Lcom/google/android/exoplayer/n;->p0:I

    .line 8
    iput v7, p0, Lcom/google/android/exoplayer/n;->q0:I

    .line 9
    iput v8, p0, Lcom/google/android/exoplayer/n;->r0:I

    .line 10
    iput v9, p0, Lcom/google/android/exoplayer/n;->s0:F

    :cond_1
    :goto_0
    return-void
.end method

.method static synthetic a(Lcom/google/android/exoplayer/n;)Lcom/google/android/exoplayer/n$d;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/google/android/exoplayer/n;->Q:Lcom/google/android/exoplayer/n$d;

    return-object p0
.end method

.method private a(Landroid/media/MediaFormat;Z)V
    .locals 7
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "InlinedApi"
        }
    .end annotation

    const-string v0, "max-input-size"

    .line 72
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    return-void

    :cond_0
    const-string v1, "height"

    .line 73
    invoke-virtual {p1, v1}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v1

    if-eqz p2, :cond_1

    const-string v2, "max-height"

    .line 74
    invoke-virtual {p1, v2}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 75
    invoke-virtual {p1, v2}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v2

    invoke-static {v1, v2}, Ljava/lang/Math;->max(II)I

    move-result v1

    :cond_1
    const-string v2, "width"

    .line 76
    invoke-virtual {p1, v2}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v2

    if-eqz p2, :cond_2

    const-string p2, "max-width"

    .line 77
    invoke-virtual {p1, p2}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 78
    invoke-virtual {p1, p2}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p2

    invoke-static {v1, p2}, Ljava/lang/Math;->max(II)I

    move-result v2

    :cond_2
    const-string p2, "mime"

    .line 79
    invoke-virtual {p1, p2}, Landroid/media/MediaFormat;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    const/4 v3, -0x1

    invoke-virtual {p2}, Ljava/lang/String;->hashCode()I

    move-result v4

    const/4 v5, 0x1

    const/4 v6, 0x2

    sparse-switch v4, :sswitch_data_0

    goto :goto_0

    :sswitch_0
    const-string v4, "video/x-vnd.on2.vp9"

    invoke-virtual {p2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_3

    const/4 v3, 0x2

    goto :goto_0

    :sswitch_1
    const-string v4, "video/x-vnd.on2.vp8"

    invoke-virtual {p2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_3

    const/4 v3, 0x1

    goto :goto_0

    :sswitch_2
    const-string v4, "video/avc"

    invoke-virtual {p2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_3

    const/4 v3, 0x0

    :cond_3
    :goto_0
    if-eqz v3, :cond_6

    if-eq v3, v5, :cond_5

    if-eq v3, v6, :cond_4

    return-void

    :cond_4
    mul-int v2, v2, v1

    const/4 p2, 0x4

    goto :goto_2

    :cond_5
    mul-int v2, v2, v1

    :goto_1
    const/4 p2, 0x2

    goto :goto_2

    .line 80
    :cond_6
    sget-object p2, Lcom/google/android/exoplayer/util/o;->d:Ljava/lang/String;

    const-string v3, "BRAVIA 4K 2015"

    invoke-virtual {v3, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_7

    return-void

    :cond_7
    add-int/lit8 v2, v2, 0xf

    .line 81
    div-int/lit8 v2, v2, 0x10

    add-int/lit8 v1, v1, 0xf

    div-int/lit8 v1, v1, 0x10

    mul-int v2, v2, v1

    mul-int/lit8 v2, v2, 0x10

    mul-int/lit8 v2, v2, 0x10

    goto :goto_1

    :goto_2
    mul-int/lit8 v2, v2, 0x3

    mul-int/lit8 p2, p2, 0x2

    .line 82
    div-int/2addr v2, p2

    .line 83
    invoke-virtual {p1, v0, v2}, Landroid/media/MediaFormat;->setInteger(Ljava/lang/String;I)V

    return-void

    nop

    :sswitch_data_0
    .sparse-switch
        0x4f62373a -> :sswitch_2
        0x5f50bed8 -> :sswitch_1
        0x5f50bed9 -> :sswitch_0
    .end sparse-switch
.end method

.method private a(Landroid/view/Surface;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 7
    iget-object v0, p0, Lcom/google/android/exoplayer/n;->U:Landroid/view/Surface;

    if-ne v0, p1, :cond_0

    return-void

    .line 8
    :cond_0
    iput-object p1, p0, Lcom/google/android/exoplayer/n;->U:Landroid/view/Surface;

    const/4 p1, 0x0

    .line 9
    iput-boolean p1, p0, Lcom/google/android/exoplayer/n;->V:Z

    .line 10
    invoke-virtual {p0}, Lcom/google/android/exoplayer/u;->f()I

    move-result p1

    const/4 v0, 0x2

    if-eq p1, v0, :cond_1

    const/4 v0, 0x3

    if-ne p1, v0, :cond_2

    .line 11
    :cond_1
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V

    .line 12
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    :cond_2
    return-void
.end method

.method private y()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_1

    iget-object v1, p0, Lcom/google/android/exoplayer/n;->Q:Lcom/google/android/exoplayer/n$d;

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Lcom/google/android/exoplayer/n;->V:Z

    if-eqz v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    iget-object v1, p0, Lcom/google/android/exoplayer/n;->U:Landroid/view/Surface;

    .line 3
    new-instance v2, Lcom/google/android/exoplayer/n$b;

    invoke-direct {v2, p0, v1}, Lcom/google/android/exoplayer/n$b;-><init>(Lcom/google/android/exoplayer/n;Landroid/view/Surface;)V

    invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/google/android/exoplayer/n;->V:Z

    :cond_1
    :goto_0
    return-void
.end method

.method private z()V
    .locals 7

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/google/android/exoplayer/n;->Q:Lcom/google/android/exoplayer/n$d;

    if-eqz v0, :cond_1

    iget v0, p0, Lcom/google/android/exoplayer/n;->Z:I

    if-nez v0, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    .line 3
    iget v2, p0, Lcom/google/android/exoplayer/n;->Z:I

    .line 4
    iget-wide v3, p0, Lcom/google/android/exoplayer/n;->Y:J

    sub-long v3, v0, v3

    .line 5
    iget-object v5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    new-instance v6, Lcom/google/android/exoplayer/n$c;

    invoke-direct {v6, p0, v2, v3, v4}, Lcom/google/android/exoplayer/n$c;-><init>(Lcom/google/android/exoplayer/n;IJ)V

    invoke-virtual {v5, v6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    const/4 v2, 0x0

    .line 6
    iput v2, p0, Lcom/google/android/exoplayer/n;->Z:I

    .line 7
    iput-wide v0, p0, Lcom/google/android/exoplayer/n;->Y:J

    :cond_1
    :goto_0
    return-void
.end method


# virtual methods
.method public a(ILjava/lang/Object;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const/4 v0, 0x1

    if-ne p1, v0, :cond_0

    .line 5
    check-cast p2, Landroid/view/Surface;

    invoke-direct {p0, p2}, Lcom/google/android/exoplayer/n;->a(Landroid/view/Surface;)V

    goto :goto_0

    .line 6
    :cond_0
    invoke-super {p0, p1, p2}, Lcom/google/android/exoplayer/u;->a(ILjava/lang/Object;)V

    :goto_0
    return-void
.end method

.method protected a(Landroid/media/MediaCodec;I)V
    .locals 1

    const-string v0, "dropVideoBuffer"

    .line 56
    invoke-static {v0}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 57
    invoke-virtual {p1, p2, v0}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    .line 58
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 59
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget p2, p1, Lcom/google/android/exoplayer/c;->g:I

    add-int/lit8 p2, p2, 0x1

    iput p2, p1, Lcom/google/android/exoplayer/c;->g:I

    .line 60
    iget p2, p0, Lcom/google/android/exoplayer/n;->Z:I

    add-int/lit8 p2, p2, 0x1

    iput p2, p0, Lcom/google/android/exoplayer/n;->Z:I

    .line 61
    iget p2, p0, Lcom/google/android/exoplayer/n;->i0:I

    add-int/lit8 p2, p2, 0x1

    iput p2, p0, Lcom/google/android/exoplayer/n;->i0:I

    .line 62
    iget v0, p1, Lcom/google/android/exoplayer/c;->h:I

    invoke-static {p2, v0}, Ljava/lang/Math;->max(II)I

    move-result p2

    iput p2, p1, Lcom/google/android/exoplayer/c;->h:I

    .line 63
    iget p1, p0, Lcom/google/android/exoplayer/n;->Z:I

    iget p2, p0, Lcom/google/android/exoplayer/n;->T:I

    if-ne p1, p2, :cond_0

    .line 64
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->z()V

    :cond_0
    return-void
.end method

.method protected a(Landroid/media/MediaCodec;IJ)V
    .locals 1
    .annotation build Landroid/annotation/TargetApi;
        value = 0x15
    .end annotation

    .line 65
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->A()V

    const-string v0, "releaseOutputBuffer"

    .line 66
    invoke-static {v0}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    .line 67
    invoke-virtual {p1, p2, p3, p4}, Landroid/media/MediaCodec;->releaseOutputBuffer(IJ)V

    .line 68
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 69
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget p2, p1, Lcom/google/android/exoplayer/c;->e:I

    const/4 p3, 0x1

    add-int/2addr p2, p3

    iput p2, p1, Lcom/google/android/exoplayer/c;->e:I

    .line 70
    iput-boolean p3, p0, Lcom/google/android/exoplayer/n;->W:Z

    .line 71
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->y()V

    return-void
.end method

.method protected a(Landroid/media/MediaCodec;ZLandroid/media/MediaFormat;Landroid/media/MediaCrypto;)V
    .locals 1

    .line 13
    invoke-direct {p0, p3, p2}, Lcom/google/android/exoplayer/n;->a(Landroid/media/MediaFormat;Z)V

    .line 14
    iget-object p2, p0, Lcom/google/android/exoplayer/n;->U:Landroid/view/Surface;

    const/4 v0, 0x0

    invoke-virtual {p1, p3, p2, p4, v0}, Landroid/media/MediaCodec;->configure(Landroid/media/MediaFormat;Landroid/view/Surface;Landroid/media/MediaCrypto;I)V

    .line 15
    iget p2, p0, Lcom/google/android/exoplayer/n;->S:I

    invoke-virtual {p1, p2}, Landroid/media/MediaCodec;->setVideoScalingMode(I)V

    return-void
.end method

.method protected a(Landroid/media/MediaFormat;)V
    .locals 6

    const-string v0, "crop-right"

    .line 19
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    const-string v2, "crop-top"

    const-string v3, "crop-bottom"

    const-string v4, "crop-left"

    const/4 v5, 0x1

    if-eqz v1, :cond_0

    .line 20
    invoke-virtual {p1, v4}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-virtual {p1, v3}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 21
    invoke-virtual {p1, v2}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    if-eqz v1, :cond_1

    .line 22
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p1, v4}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v4

    sub-int/2addr v0, v4

    add-int/2addr v0, v5

    goto :goto_1

    :cond_1
    const-string v0, "width"

    .line 23
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v0

    :goto_1
    iput v0, p0, Lcom/google/android/exoplayer/n;->l0:I

    if-eqz v1, :cond_2

    .line 24
    invoke-virtual {p1, v3}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p1, v2}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p1

    sub-int/2addr v0, p1

    add-int/2addr v0, v5

    goto :goto_2

    :cond_2
    const-string v0, "height"

    .line 25
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v0

    :goto_2
    iput v0, p0, Lcom/google/android/exoplayer/n;->m0:I

    .line 26
    iget p1, p0, Lcom/google/android/exoplayer/n;->k0:F

    iput p1, p0, Lcom/google/android/exoplayer/n;->o0:F

    .line 27
    sget p1, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v0, 0x15

    if-lt p1, v0, :cond_4

    .line 28
    iget p1, p0, Lcom/google/android/exoplayer/n;->j0:I

    const/16 v0, 0x5a

    if-eq p1, v0, :cond_3

    const/16 v0, 0x10e

    if-ne p1, v0, :cond_5

    .line 29
    :cond_3
    iget p1, p0, Lcom/google/android/exoplayer/n;->l0:I

    .line 30
    iget v0, p0, Lcom/google/android/exoplayer/n;->m0:I

    iput v0, p0, Lcom/google/android/exoplayer/n;->l0:I

    .line 31
    iput p1, p0, Lcom/google/android/exoplayer/n;->m0:I

    const/high16 p1, 0x3f800000    # 1.0f

    .line 32
    iget v0, p0, Lcom/google/android/exoplayer/n;->o0:F

    div-float/2addr p1, v0

    iput p1, p0, Lcom/google/android/exoplayer/n;->o0:F

    goto :goto_3

    .line 33
    :cond_4
    iget p1, p0, Lcom/google/android/exoplayer/n;->j0:I

    iput p1, p0, Lcom/google/android/exoplayer/n;->n0:I

    :cond_5
    :goto_3
    return-void
.end method

.method protected a(Lcom/google/android/exoplayer/p;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 16
    invoke-super {p0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/p;)V

    .line 17
    iget-object v0, p1, Lcom/google/android/exoplayer/p;->a:Lcom/google/android/exoplayer/o;

    iget v0, v0, Lcom/google/android/exoplayer/o;->m:F

    const/high16 v1, -0x40800000    # -1.0f

    cmpl-float v1, v0, v1

    if-nez v1, :cond_0

    const/high16 v0, 0x3f800000    # 1.0f

    :cond_0
    iput v0, p0, Lcom/google/android/exoplayer/n;->k0:F

    .line 18
    iget-object p1, p1, Lcom/google/android/exoplayer/p;->a:Lcom/google/android/exoplayer/o;

    iget p1, p1, Lcom/google/android/exoplayer/o;->l:I

    const/4 v0, -0x1

    if-ne p1, v0, :cond_1

    const/4 p1, 0x0

    :cond_1
    iput p1, p0, Lcom/google/android/exoplayer/n;->j0:I

    return-void
.end method

.method protected a(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;IZ)Z
    .locals 6

    const/4 p6, 0x1

    const/4 v0, 0x0

    if-eqz p9, :cond_0

    .line 35
    invoke-virtual {p0, p5, p8}, Lcom/google/android/exoplayer/n;->c(Landroid/media/MediaCodec;I)V

    .line 36
    iput v0, p0, Lcom/google/android/exoplayer/n;->i0:I

    return p6

    .line 37
    :cond_0
    iget-boolean p9, p0, Lcom/google/android/exoplayer/n;->W:Z

    const/16 v1, 0x15

    if-nez p9, :cond_2

    .line 38
    sget p1, Lcom/google/android/exoplayer/util/o;->a:I

    if-lt p1, v1, :cond_1

    .line 39
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide p1

    invoke-virtual {p0, p5, p8, p1, p2}, Lcom/google/android/exoplayer/n;->a(Landroid/media/MediaCodec;IJ)V

    goto :goto_0

    .line 40
    :cond_1
    invoke-virtual {p0, p5, p8}, Lcom/google/android/exoplayer/n;->b(Landroid/media/MediaCodec;I)V

    .line 41
    :goto_0
    iput v0, p0, Lcom/google/android/exoplayer/n;->i0:I

    return p6

    .line 42
    :cond_2
    invoke-virtual {p0}, Lcom/google/android/exoplayer/u;->f()I

    move-result p9

    const/4 v2, 0x3

    if-eq p9, v2, :cond_3

    return v0

    .line 43
    :cond_3
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    const-wide/16 v4, 0x3e8

    mul-long v2, v2, v4

    sub-long/2addr v2, p3

    .line 44
    iget-wide p3, p7, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    sub-long/2addr p3, p1

    sub-long/2addr p3, v2

    .line 45
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide p1

    mul-long p3, p3, v4

    add-long/2addr p3, p1

    .line 46
    iget-object p9, p0, Lcom/google/android/exoplayer/n;->P:Lcom/google/android/exoplayer/v;

    iget-wide v2, p7, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    invoke-virtual {p9, v2, v3, p3, p4}, Lcom/google/android/exoplayer/v;->a(JJ)J

    move-result-wide p3

    sub-long p1, p3, p1

    .line 47
    div-long/2addr p1, v4

    const-wide/16 v2, -0x7530

    cmp-long p7, p1, v2

    if-gez p7, :cond_4

    .line 48
    invoke-virtual {p0, p5, p8}, Lcom/google/android/exoplayer/n;->a(Landroid/media/MediaCodec;I)V

    return p6

    .line 49
    :cond_4
    sget p7, Lcom/google/android/exoplayer/util/o;->a:I

    if-lt p7, v1, :cond_5

    const-wide/32 v1, 0xc350

    cmp-long p7, p1, v1

    if-gez p7, :cond_7

    .line 50
    invoke-virtual {p0, p5, p8, p3, p4}, Lcom/google/android/exoplayer/n;->a(Landroid/media/MediaCodec;IJ)V

    .line 51
    iput v0, p0, Lcom/google/android/exoplayer/n;->i0:I

    return p6

    :cond_5
    const-wide/16 p3, 0x7530

    cmp-long p7, p1, p3

    if-gez p7, :cond_7

    const-wide/16 p3, 0x2af8

    cmp-long p7, p1, p3

    if-lez p7, :cond_6

    const-wide/16 p3, 0x2710

    sub-long/2addr p1, p3

    .line 52
    :try_start_0
    div-long/2addr p1, v4

    invoke-static {p1, p2}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 53
    :catch_0
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Thread;->interrupt()V

    .line 54
    :cond_6
    :goto_1
    invoke-virtual {p0, p5, p8}, Lcom/google/android/exoplayer/n;->b(Landroid/media/MediaCodec;I)V

    .line 55
    iput v0, p0, Lcom/google/android/exoplayer/n;->i0:I

    return p6

    :cond_7
    return v0
.end method

.method protected a(Landroid/media/MediaCodec;ZLcom/google/android/exoplayer/o;Lcom/google/android/exoplayer/o;)Z
    .locals 1

    .line 34
    iget-object p1, p4, Lcom/google/android/exoplayer/o;->b:Ljava/lang/String;

    iget-object v0, p3, Lcom/google/android/exoplayer/o;->b:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_1

    if-nez p2, :cond_0

    iget p1, p3, Lcom/google/android/exoplayer/o;->h:I

    iget p2, p4, Lcom/google/android/exoplayer/o;->h:I

    if-ne p1, p2, :cond_1

    iget p1, p3, Lcom/google/android/exoplayer/o;->i:I

    iget p2, p4, Lcom/google/android/exoplayer/o;->i:I

    if-ne p1, p2, :cond_1

    :cond_0
    const/4 p1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x0

    :goto_0
    return p1
.end method

.method protected a(Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/o;)Z
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/MediaCodecUtil$DecoderQueryException;
        }
    .end annotation

    .line 2
    iget-object v0, p2, Lcom/google/android/exoplayer/o;->b:Ljava/lang/String;

    .line 3
    invoke-static {v0}, Lcom/google/android/exoplayer/util/f;->c(Ljava/lang/String;)Z

    move-result v1

    const/4 v2, 0x0

    if-eqz v1, :cond_1

    const-string v1, "video/x-unknown"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 4
    invoke-interface {p1, p2, v2}, Lcom/google/android/exoplayer/m;->a(Lcom/google/android/exoplayer/o;Z)Lcom/google/android/exoplayer/e;

    move-result-object p1

    if-eqz p1, :cond_1

    :cond_0
    const/4 v2, 0x1

    :cond_1
    return v2
.end method

.method protected b(IJZ)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 1
    invoke-super {p0, p1, p2, p3, p4}, Lcom/google/android/exoplayer/s;->b(IJZ)V

    if-eqz p4, :cond_0

    .line 2
    iget-wide p1, p0, Lcom/google/android/exoplayer/n;->R:J

    const-wide/16 p3, 0x0

    cmp-long v0, p1, p3

    if-lez v0, :cond_0

    .line 3
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide p1

    const-wide/16 p3, 0x3e8

    mul-long p1, p1, p3

    iget-wide p3, p0, Lcom/google/android/exoplayer/n;->R:J

    add-long/2addr p1, p3

    iput-wide p1, p0, Lcom/google/android/exoplayer/n;->X:J

    .line 4
    :cond_0
    iget-object p1, p0, Lcom/google/android/exoplayer/n;->P:Lcom/google/android/exoplayer/v;

    invoke-virtual {p1}, Lcom/google/android/exoplayer/v;->b()V

    return-void
.end method

.method protected b(Landroid/media/MediaCodec;I)V
    .locals 1

    .line 5
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->A()V

    const-string v0, "releaseOutputBuffer"

    .line 6
    invoke-static {v0}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    const/4 v0, 0x1

    .line 7
    invoke-virtual {p1, p2, v0}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    .line 8
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 9
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget p2, p1, Lcom/google/android/exoplayer/c;->e:I

    add-int/2addr p2, v0

    iput p2, p1, Lcom/google/android/exoplayer/c;->e:I

    .line 10
    iput-boolean v0, p0, Lcom/google/android/exoplayer/n;->W:Z

    .line 11
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->y()V

    return-void
.end method

.method protected c(Landroid/media/MediaCodec;I)V
    .locals 1

    const-string v0, "skipVideoBuffer"

    .line 1
    invoke-static {v0}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 2
    invoke-virtual {p1, p2, v0}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    .line 3
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 4
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget p2, p1, Lcom/google/android/exoplayer/c;->f:I

    add-int/lit8 p2, p2, 0x1

    iput p2, p1, Lcom/google/android/exoplayer/c;->f:I

    return-void
.end method

.method protected d(J)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 1
    invoke-super {p0, p1, p2}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->d(J)V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/google/android/exoplayer/n;->W:Z

    .line 3
    iput p1, p0, Lcom/google/android/exoplayer/n;->i0:I

    const-wide/16 p1, -0x1

    .line 4
    iput-wide p1, p0, Lcom/google/android/exoplayer/n;->X:J

    return-void
.end method

.method protected i()Z
    .locals 9

    .line 1
    invoke-super {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->i()Z

    move-result v0

    const/4 v1, 0x1

    const-wide/16 v2, -0x1

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Lcom/google/android/exoplayer/n;->W:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->t()I

    move-result v0

    const/4 v4, 0x2

    if-ne v0, v4, :cond_1

    .line 3
    :cond_0
    iput-wide v2, p0, Lcom/google/android/exoplayer/n;->X:J

    return v1

    .line 4
    :cond_1
    iget-wide v4, p0, Lcom/google/android/exoplayer/n;->X:J

    const/4 v0, 0x0

    cmp-long v6, v4, v2

    if-nez v6, :cond_2

    return v0

    .line 5
    :cond_2
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v4

    const-wide/16 v6, 0x3e8

    mul-long v4, v4, v6

    iget-wide v6, p0, Lcom/google/android/exoplayer/n;->X:J

    cmp-long v8, v4, v6

    if-gez v8, :cond_3

    return v1

    .line 6
    :cond_3
    iput-wide v2, p0, Lcom/google/android/exoplayer/n;->X:J

    return v0
.end method

.method protected k()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const/4 v0, -0x1

    .line 1
    iput v0, p0, Lcom/google/android/exoplayer/n;->l0:I

    .line 2
    iput v0, p0, Lcom/google/android/exoplayer/n;->m0:I

    const/high16 v1, -0x40800000    # -1.0f

    .line 3
    iput v1, p0, Lcom/google/android/exoplayer/n;->o0:F

    .line 4
    iput v1, p0, Lcom/google/android/exoplayer/n;->k0:F

    .line 5
    iput v0, p0, Lcom/google/android/exoplayer/n;->p0:I

    .line 6
    iput v0, p0, Lcom/google/android/exoplayer/n;->q0:I

    .line 7
    iput v1, p0, Lcom/google/android/exoplayer/n;->s0:F

    .line 8
    iget-object v0, p0, Lcom/google/android/exoplayer/n;->P:Lcom/google/android/exoplayer/v;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/v;->a()V

    .line 9
    invoke-super {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->k()V

    return-void
.end method

.method protected m()V
    .locals 2

    .line 1
    invoke-super {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m()V

    const/4 v0, 0x0

    .line 2
    iput v0, p0, Lcom/google/android/exoplayer/n;->Z:I

    .line 3
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/exoplayer/n;->Y:J

    return-void
.end method

.method protected n()V
    .locals 2

    const-wide/16 v0, -0x1

    .line 1
    iput-wide v0, p0, Lcom/google/android/exoplayer/n;->X:J

    .line 2
    invoke-direct {p0}, Lcom/google/android/exoplayer/n;->z()V

    .line 3
    invoke-super {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n()V

    return-void
.end method

.method protected x()Z
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/google/android/exoplayer/n;->U:Landroid/view/Surface;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/view/Surface;->isValid()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method
